package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class IteratingThroughElementsOfAnArrayList {
	public static void main(String[] args) {
		List<String> nameList = new ArrayList<>();

		nameList.add("A");
		nameList.add("B");
		nameList.add("C");

		int count = nameList.size();

		System.out.println("列出每个元素...");
		for (int i = 0; i < count; i++) {
			String name = nameList.get(i);
			System.out.println(name);
		}
	}
}
